<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>办公时间倒计时</title>
    <style>
        :root {
            --primary-color: #2196F3;
            --secondary-color: #FF9800;
            --glass-blur: blur(12px);
        }

        body {
            margin: 0;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
            font-family: 'Segoe UI', sans-serif;
        }

        .glass-container {
            background: rgba(255, 255, 255, 0.15);
            padding: 3rem 5rem;
            border-radius: 20px;
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            text-align: center;
            color: white;
            min-width: 500px;
            position: relative;
            overflow: hidden;
        }

        .glass-container::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                45deg,
                rgba(255,255,255,0) 25%,
                rgba(255,255,255,0.2) 50%,
                rgba(255,255,255,0) 75%
            );
            transform: rotate(30deg);
            animation: liquidFlow 8s linear infinite;
        }

        @keyframes liquidFlow {
            0% { transform: translateX(-50%) rotate(30deg); }
            100% { transform: translateX(50%) rotate(30deg); }
        }

        .time-display {
            font-size: 6vw;
            font-weight: 300;
            margin: 20px 0;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }

        .schedule {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
            margin-top: 2rem;
        }

        .time-card {
            background: rgba(255,255,255,0.1);
            padding: 1rem;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.2);
        }

        .status-text {
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }
    </style>
</head>
<body>
    <div class="glass-container">
        <div class="status-text" id="status">加载中...</div>
        <div class="time-display" id="countdown">00:00:00</div>
        
        <div class="schedule">
            <div class="time-card">
                <div>上班时间</div>
                <div>08:30</div>
            </div>
            <div class="time-card">
                <div>午休时间</div>
                <div>11:20</div>
            </div>
            <div class="time-card">
                <div>下午上班</div>
                <div>13:30</div>
            </div>
            <div class="time-card">
                <div>下班时间</div>
                <div>17:00</div>
            </div>
        </div>
    </div>

    <script>
        function updateCountdown() {
            const now = new Date();
            const day = now.getDay();
            
            // 周末判断
            if (day === 0 || day === 6) {
                document.getElementById('status').textContent = "周末愉快！";
                document.getElementById('countdown').textContent = "好好休息";
                return;
            }

            // 定义时间节点
            const times = [
                { name: "上班", time: setTime(8, 30), color: "#2196F3" },
                { name: "午休", time: setTime(11, 20), color: "#FF9800" },
                { name: "下午上班", time: setTime(13, 30), color: "#2196F3" },
                { name: "下班", time: setTime(17, 0), color: "#4CAF50" }
            ];

            // 查找下一个时间节点
            const nextEvent = times.find(t => now < t.time) || times[0];
            const diff = nextEvent.time - now;

            // 格式化倒计时
            const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
            const seconds = Math.floor((diff % (1000 * 60)) / 1000);

            // 更新显示
            document.documentElement.style.setProperty('--primary-color', nextEvent.color);
            document.getElementById('status').textContent = `距离${nextEvent.name}还有`;
            document.getElementById('countdown').textContent = 
                `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
        }

        function setTime(hours, minutes) {
            const date = new Date();
            date.setHours(hours, minutes, 0);
            return date;
        }

        // 立即执行并每秒更新
        updateCountdown();
        setInterval(updateCountdown, 1000);
    </script>
</body>
</html>